package com.alumni_circle.service.me.impl;

import com.alumni_circle.entity.me.User;
import com.alumni_circle.entity.me.VO.UserSearchVO;
import com.alumni_circle.entity.me.VO.UserUpdateVO;
import com.alumni_circle.entity.me.VO.UserViewVO;
import com.alumni_circle.mapper.me.UserMapper;
import com.alumni_circle.service.me.IUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 龙小虬
 * @since 2020-07-06 22:55
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {

    @Resource
    UserMapper userMapper;

    @Override
    public List<UserUpdateVO> searchUser(String name, String updateName, String updateTime, String email, String phone, String role) {
        return userMapper.searchUser(name, updateName, updateTime, email, phone, role);
    }

    @Override
    public List<UserUpdateVO> getAllUsers() {
        return userMapper.getAllUsers();
    }

    @Override
    public void updateUser(String state,String id) {
        userMapper.updateUser(state,id);
    }

    @Override
    public void delUser(String id) {
        userMapper.delUser(id);
    }
}
